const getPicker = (picker, day) => {
    const end = new Date();
    const start = new Date();
    start.setTime(start.getTime() - 3600 * 1000 * 24 * day);
    picker.$emit('pick', [start, end]);
}
export default {
    searchData: {},
    pickerOptions: {
        shortcuts: [{
            text: '今天',
            onClick: picker => getPicker(picker,0)
        },{
            text: '最近一周',
            onClick: picker => getPicker(picker,7)
        }, {
            text: '最近一个月',
            onClick: picker => getPicker(picker,30)
        }, {
            text: '最近三个月',
            onClick: picker => getPicker(picker,90)
        }]
    },
    value1: '',
    value2: ''
}